<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%String path = request.getContextPath() ;%>
<!--只在模块名下面有效 -->
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c"%>
<%@ taglib uri="/WEB-INF/tld/ui.tld" prefix="ui"%>
<%@ taglib uri="/WEB-INF/tld/sys.tld" prefix="sys"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>集团成员</title>
<jsp:include page="../../import.jsp" flush="true" />
</head>
<body class="iframeBody">
	<div class="Wrapper">
		<div>
			<div class="searchArea">
				<form id="searchBar">
					<div class="fieldset1 clearFix">
						<div class="fieldBox">
							<div class="label" style="width: 60px;">成员名称</div>
							<div class="field">
								<input name="c_name" id="c_name" type="text" class="ui-textbox" value="">
							</div>
						</div>
						<div class="fieldBox">
							<div class="label" style="width: 80px;">组织机构代码</div>
							<div class="field">
								<input name="org_code" id="org_code" type="text" class="ui-textbox" value="">
							</div>
						</div>
						<div class="fieldBox">
							<div class="label">审核状态</div>
							<div class="field">
								<select name="AUD_STS_CD" id="AUD_STS_CD" data-value=" ">
									<option value=" " seleted>请选择</option>
									<option value="0" seleted>待提交</option>
									<option value="1" seleted>审核中</option>
									<option value="2" seleted>审核通过</option>
									<option value="3" seleted>审核不通过</option>
								</select>
							</div>
						</div>
						<div class="fieldBox">
							<div class="label">是否黑名单</div>
							<div class="field">
								<select name="IS_BLACK_LIST" id="IS_BLACK_LIST" data-value=" ">
									<option value=" " seleted>请选择</option>
									<option value="0" seleted>否</option>
									<option value="1" seleted>是</option>
								</select>
							</div>
						</div>
						<div class="clearFix"></div>
						<div class="btnsBox">
							<span id="searchBtn" onclick='loadData()' class="sq-button sq-button-round">查询</span>
						</div>
					</div>
				</form>
			</div>
			<div id="ligergridDB" class="sq-grid"></div>
		</div>
	</div>
</body>
	<script type="text/javascript">
	var id = '${id}'
	var gridDB = null;
	var form = null ;
	var data2 = {};
	var _token = '${token}'
	$(function () {
		loadData();
	});
	function initData(){
		gridDB = $("#ligergridDB").ligerGrid({
            data:data2,
            columns: [
                { display: '成员名称', name: 'c_name', minWidth: 10 ,align:'left', enabledSort:false,},
                { display: '成员类型', name: 'type', minWidth: 50 ,align:'left', enabledSort:false},
                { display: '组织机构代码', name: 'org_code', minWidth: 50 ,align:'left', enabledSort:false}, 
                { display: '审核状态', name: 'AUD_STS_CD', minWidth: 50 ,align:'left', enabledSort:false,
                	render:function (rowdata, rowindex, value){
                		if(rowdata.AUD_STS_CD == 0){
                			return "待提交"
                		}else if(rowdata.AUD_STS_CD == 1){
                			return "审核中"
                		}else if(rowdata.AUD_STS_CD == 2){
                			return "审核通过"
                		}else if(rowdata.AUD_STS_CD == 3){
                			return "审核不通过"
                		}else if(rowdata.AUD_STS_CD == 4){
                			return "驳回呈报人"
                		}
                	}
                }, 
                { display: '是否黑名单', name: 'IS_BLACK_LIST', minWidth: 50 ,align:'left', enabledSort:false,
                	render:function (rowdata, rowindex, value){
                		if(rowdata.IS_BLACK_LIST == 1){
                			return "是"
                		}else{
                			return "否"
                		}
                	}
                }, 
            ],
            pageSize:100,
            pageSizeOptions: [10, 20, 30, 40, 50, 100],//按照自己的喜好选择不同的页面显示条数
            root:'data',
            record:'count',
            hideLoadButton : true,
            width: '100%',
            height:'100%',
            heightDiff:-30,
            checkbox:true,
            rownumbers:true,
            fixedCellHeight: false,
            pageParmName:'currentPage',
            usePage:false,
            pagesizeParmName:'pageSize',
        });
		//gridDB.setHeight(100);

		form = $("#searchBar").ligerForm();
		
	}
	function loadData(){
		var _c_name = $("#c_name").val();
		var _org_code = $("#org_code").val();
		var _AUD_STS_CD = $("#AUD_STS_CD").val()
		var _IS_BLACK_LIST = $("#IS_BLACK_LIST").val()
		$.ajax({
              type: 'get',
              dataType: 'json',
              url: 'http://10.20.7.110:8090/sq/group/'+id+'?pageSize=100',
			  beforeSend: function (XMLHttpRequest) {
            	XMLHttpRequest.setRequestHeader("token", _token);
         	  },
            data:{c_name:_c_name,org_code:_org_code,AUD_STS_CD:_AUD_STS_CD,IS_BLACK_LIST:_IS_BLACK_LIST},
              success: function (msg) {
                  var resultData = msg.data.list_company ;
                  data2.data = resultData;
                  console.log(data2);
                  data2.count=msg.data.count;
                  //return data2 ;
                  initData();
              }
      });
	  }
	
</script>


</html>
